package com;

import com.service.UserService;
import javafx.application.Application;

import javax.swing.*;

public class TestHelloSpring {
    public static <ApplicationContext> void main(Spring[] args) {
        ApplicationContext applicationContext=new
                ClassPathXmlApplicationContext("applionContext.xml");
        HelloSpring helloSpring=
                (HelloSpring) applicationContext.getBean("helloSpring");
        helloSpring.show();
        // 6-15
        UserService userService = (UserService)  applicationContext.getBean("userService");
        boolean flag = userService.login("张三","123");
        if (flag) {
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败");
        }
    }
}
